package threaddemo;

public class MyFirstThreadTest {

	public static void main(String[] args) {
		
//		new MyFirstThread().start();
//		new MyFirstThread().start();
//		System.out.println("dddddddddddddddddddddddddddddddd");
		Thread t1=new Thread(new MyFirstRunnable());
		t1.setPriority(9);
		
		
		new Thread(new MyFirstRunnable(),"yyyyy").start();
		new Thread(new MyFirstRunnable(),"xxxxx").start();
		
	}
}

class MyFirstThread extends Thread{
	public void run(){
		for (int i = 0; i <100; i++) {
			System.out.println(Thread.currentThread().getName()+i);
		}
	}
}

class MyFirstRunnable implements Runnable{

	public void run() {
		// TODO Auto-generated method stub
		for (int i = 0; i <100; i++) {
			System.out.println(Thread.currentThread().getName()+i);
		}
	}
	
}